#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QSignalMapper>
#include "msgsender.h"
#include "formvehilceinfo.h"
#define MAX_VEHFORM    6
namespace Ui {
    class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();
public slots:
    void showResponse(RESTYPE resType);
    void displayVehQueue(VEHICLE* vehQueue);
    void displayFirstVeh(const VEHICLE& headVeh);
protected:
    //获取默认IP，从ini文件中读取
    void getDefaultIp();
    //将车型显示widget加入到主界面中
    void addVehForm();
private slots:
    void on_pushButton_clicked();
    void showError(const QString& sError);
    void connected();
    void on_pushButton_21_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_19_clicked();

    void vehClassButtonClicked(const QString& sVehClass);

private:
    Ui::Widget *ui;
private:
    MsgSender m_msgSender;
    FormVehicleInfo m_vehFormArray[MAX_VEHFORM];
    QSignalMapper m_map;
};

#endif // WIDGET_H
